<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>

		<p:dataTable var="requestItem" value="#{dtItemRequestLazyView.lazyModel}"
			paginator="false" rows="10"
            paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}" 
			selectionMode="single"
			selection="#{dtItemRequestLazyView.selectedItem}" id="requestItemTable" lazy="true">

			<p:ajax event="rowSelect" disabled="#{not purchaseRequisitionBean.statusOpen}"
				listener="#{dtItemRequestLazyView.onRowSelect}"
				update=":reqTableDlgForm:itemRequestDetail" oncomplete="PF('itemRequestDialog').show()" />

			<p:column headerText="Item #">
				<h:outputText value="#{requestItem.itemNumber}" />
			</p:column>
			<p:column headerText="Description">
				<h:outputText value="#{requestItem.partUnit.shortName}" />
			</p:column>
			<p:column headerText="Brand">
				<h:outputText value="#{requestItem.partUnit.shortBrand}" />
			</p:column>
			<p:column headerText="Part Number">
				<h:outputText value="#{requestItem.partUnit.part}" />
			</p:column>
			<p:column headerText="Quantity">
				<h:outputText value="#{requestItem.quantity}" />
			</p:column>
			<p:column headerText="Unit">
				<h:outputText value="#{requestItem.partUnit.shortUnit}" />
			</p:column>

		</p:dataTable>

	</ui:composition>
</body>
</html>